home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / ca29_4.zip / VOICEON.CMD < prev   
OS/2 REXX Batch file  |  1991-06-10  |  2KB  |  55 lines

  1.    S29 = "VoiceON ver 1.1     " ; 20 chars long
  2.    LEGEND S29
  3.    S28 = "talker.ovl"           ; Our overlay file
  4.    S27 = "pc-vco.exc"           ; Our exception file
  5. ;
  6. ; ----- VoiceON: Scripted interface to VOICE.EXE: Turn VOICE ON
  7. ;
  8. ;    R.McG; 3/90, Chicago
  9. ; ----------------------------------------------------------------
  10. ; Usages:
  11. ;      S29 -----> Legend line
  12. ;      S28 -----> Our own overlay file name
  13. ;      S27 -----> Our exception file
  14. ;
  15. ; -----------------------------------------------------------------------
  16. ;    NOTE: This script terminates a previously loaded overlay
  17. ; -----------------------------------------------------------------------
  18. ;
  19. ;    Set-up the overlay (our interface to VOICE.EXE).
  20. ;    .. define an end entry pt of '9' at the same time
  21. ;
  22.    OVERLAY S28    9            ; Load our overlay (end entry pt = 9)
  23.    IF FAILED                ; Stop here if can't load overlay
  24.       MESS "!Cannot overlay file: "*S28*"!"
  25.       GOTO Exit
  26.       ENDIF
  27. ;
  28. ;    Use the overlay to 'open' the driver
  29. ;
  30.    SCALL 6,N0                ; Entry addr 6 -> open_talk
  31.    IF NOT ZERO N0            ; If anything but zero rtnd
  32.       MESS "!Cannot open voice driver!"
  33.       IF NOT ISFILE "voice.exe" MESS "!VOICE.EXE must be on current subdir!"
  34.       OVERLAY CLEAR
  35.       GOTO Exit
  36.       ENDIF
  37. ;
  38. ;    Load an exception file, if its present
  39. ;
  40.    SCALL 12,S27,N0            ; Entry addr 12 -> Load exception file
  41.    IF NOT ZERO N0            ; If anything but zero rtnd
  42.       MESS "!Exception file load error: "*N0*" using: "*S27*"!"
  43.       ENDIF                ; Not fatal error
  44.    MESS "Voice ON!"                     ; Inform
  45. ;
  46. ;    Ensure VOICE.EXE is unloaded before COM-AND terminates
  47. ;
  48.    set exit "VOICEOFF.cmd"              ; Execute before Alt-X
  49. ;
  50. ;    Return according the manner in which we were called
  51. ;
  52. Exit:
  53.    IF FCALLED FRET            ; Return if called
  54.    EXIT                 ; Else stop script
  55.